<?php

namespace DP\Filter;

use DP\Filter\CriteriaInterface;

class CriteriaSingle implements CriteriaInterface
{
    public function meetCriteria($persons)
    {
        $singles = [];

        foreach ($persons as $person) {
            if ($person->maritalStatus() == 'single') {
                $singles = $person;
            }
        }

        return $singles;
    }
}
